import { IGoods } from './category.type'
import { IResponse } from './index.type'

// findBrand api type
export interface IBrand {
  desc: string
  id: string
  logo: string
  name: string
  nameEn: string
  picture: string
  place: string
  type: null | string
}

export type IBrandResponse = IResponse<IBrand[]>

// findBanner api type
export interface IBanner {
  hrefUrl: string
  id: string
  imgUrl: string
  type: string
}

export type IBannerResponse = IResponse<IBanner[]>

// findHot api type
export interface IHot {
  alt: string
  id: string
  picture: string
  title: string
}

export type IHotResponse = IResponse<IHot[]>

//findGoods api type
export interface IProductsChilren {
  id: string
  layer: number
  name: string
  parent: any
}

export interface IProducts {
  id: string
  name: string
  picture: string
  saleInfo: string
  goods: IGoods[]
  children: IProductsChilren[]
}

export type IGoodsResponse = IResponse<IProducts[]>

//findSpecial api type
export interface ISpecial {
  creator: string
  isDelete: number
  createTime: string
  updateTime: string
  id: string
  classificationId: string
  title: string
  summary: string
  lowestPrice: number
  cover: string
  detailsUrl: string
  collectNum: number
  viewNum: number
  replyNum: number
}

export type ISpecialResponse = IResponse<ISpecial[]>

// findNew api type
export interface INews extends IGoods {}

export type INewsResponse = IResponse<INews[]>
